package com.moleq.models;

import com.moleq.db.DatabaseSchema;

public class CustomerSetting {
	// CREATE TABLE t_customer_setting
	// (cs_no varchar(15) NOT NULL,
	// cs_last_name varchar(50) NULL,
	// cs_first_name varchar(50) NULL,
	// cs_address_1 varchar(45) NULL,
	// cs_address_2 varchar(45) NULL,
	// cs_city varchar(35) NULL,
	// cs_state varchar(2) NULL,
	// cs_zip varchar(10) NULL,
	// cs_telephone varchar(15) NULL,
	// cs_email varchar(50) NULL,
	// create_datetime varchar(14) NOT NULL,
	// update_datetime varchar(14) NOT NULL,
	// PRIMARY KEY (cs_no));
	private String cs_no;
	private String cs_last_name;
	private String cs_first_name;
	private String cs_address_1;
	private String cs_address_2;
	private String cs_city;
	private String cs_state;
	private String cs_zip;
	private String cs_telephone;
	private String cs_email;
	private String create_datetime;
	private String update_datetime;

	public String getCs_no() {
		return cs_no;
	}

	public void setCs_no(String cs_no) {
		this.cs_no = cs_no;
	}

	public String getCs_last_name() {
		return cs_last_name;
	}

	public void setCs_last_name(String cs_last_name) {
		this.cs_last_name = cs_last_name;
	}

	public String getCs_first_name() {
		return cs_first_name;
	}

	public void setCs_first_name(String cs_first_name) {
		this.cs_first_name = cs_first_name;
	}

	public String getCs_address_1() {
		return cs_address_1;
	}

	public void setCs_address_1(String cs_address_1) {
		this.cs_address_1 = cs_address_1;
	}

	public String getCs_address_2() {
		return cs_address_2;
	}

	public void setCs_address_2(String cs_address_2) {
		this.cs_address_2 = cs_address_2;
	}

	public String getCs_city() {
		return cs_city;
	}

	public void setCs_city(String cs_city) {
		this.cs_city = cs_city;
	}

	public String getCs_state() {
		return cs_state;
	}

	public void setCs_state(String cs_state) {
		this.cs_state = cs_state;
	}

	public String getCs_zip() {
		return cs_zip;
	}

	public void setCs_zip(String cs_zip) {
		this.cs_zip = cs_zip;
	}

	public String getCs_telephone() {
		return cs_telephone;
	}

	public void setCs_telephone(String cs_telephone) {
		this.cs_telephone = cs_telephone;
	}

	public String getCs_email() {
		return cs_email;
	}

	public void setCs_email(String cs_email) {
		this.cs_email = cs_email;
	}

	public String getCreate_datetime() {
		return create_datetime;
	}

	public void setCreate_datetime(String create_datetime) {
		this.create_datetime = create_datetime;
	}

	public String getUpdate_datetime() {
		return update_datetime;
	}

	public void setUpdate_datetime(String update_datetime) {
		this.update_datetime = update_datetime;
	}
	
	public String toMGData(String Action) {
		String Result = Action + "|" + DatabaseSchema.CustomerSetting.SCHEMA_NAME
				+ "|(" + CheckNull(getCs_no()) + ","
				+ CheckNull(getCs_last_name()) + ","
				+ CheckNull(getCs_first_name()) + ","
				+ CheckNull(getCs_address_1()) + ","
				+ CheckNull(getCs_address_2()) + "," + CheckNull(getCs_city())
				+ "," + CheckNull(getCs_state()) + "," + CheckNull(getCs_zip())
				+ "," + CheckNull(getCs_telephone()) + ","
				+ CheckNull(getCs_email()) + ","
				+ CheckNull(getCreate_datetime()) + ","
				+ CheckNull(getUpdate_datetime()) + ")";
		return Result;
	}

	public String CheckNull(String value) {
		if (value == null) {
			return null;
		} else {
			return "'" + value + "'";
		}
	}
}
